The microfiche appendix is hereby incorporated by reference, and contains (1) slide and 27 frames.
1. Field of the Invention
This invention relates to the execution of an environment in a window of another environment or operating system.
2. Background
OpenStep(trademark) is an open, high-volume portable standard for object-oriented computing. It provides a standard application programming interface (API). The OpenStep specification is based on NeXTStep. NeXTtep(trademark) is an object-oriented operating system of NeXT Computer, Inc.
The NeXTStep Window Server running in the NeXT environment is a low-level process that is responsible for drawing images to the screen and sending events to applications. The NeXTStep Window Server manages the screen, keyboard, and mouse.
The NeXTStep Window Server includes a Display Postscript interpreter that performs the actual drawing of lines, text, and images. Postscript is a device-independent graphics description language that processes commands to perform line drawing, typesetting, and image presentation on the screen and printer output.
In addition to providing graphic user interface (GUI) capabilities, NeXTStep provides an application development environment. In addition to the development environment, the NeXTStep Application Kit, or App Kit, provides object classes for providing functionality to an application.
The NeXTStep environment runs on the Mach operating system (OS). The Mach OS is a microkernel-based operating system. A microkernel-based OS provides a basic level of services with the bulk of the operating system services supplied by user-level services. For example, the Mach kernel provides process management, memory management, communication and Input/Output services. Services such as files and directories are handled by user-level processes.
The communication service provided by the Mach OS uses a data structure called a port. A port is analogous to a mailbox. A sender (e.g., a thread, or executable subcomponent of a process) communicates with a receiver (e.g., thread of another process) by writing a message to the mailbox, or port. The receiver retrieves the sender""s message from the port.
In the above example, the sender""s message is not actually stored in the port. The message is stored in a message queue. The port contains a count of the number of messages in the message queue. When a port is created, an integer that identifies the port is sent back to the creator (e.g., a thread). The identifier is used to access the port to send or receive a message.
NeXT Computer, Inc. provides a technology referred to as Portable Distributed Objects (PDO). PDO provides the ability to use distributed object classes to write programs on non-NeXT platforms (e.g., HP, SunOS, and Solaris). PDO also provides Mach port emulation facilities.
Solaris(trademark) is a UNIX operating environment that can run on multiple hardware platforms such as Intel x86, SPARC, and PowerPC processors. OpenWindows(trademark) is a windowing system based on the X11 windowing specification that runs in Solaris. The X11/DPS is a windowing system that runs in OpenWindows. Solaris, OpenWindows, and X11/DPS are products that are available from Sun Microsystems, Inc. (Sun Microsystems, Inc., OpenWindows, X11/DPS, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and certain other countries.)
The NeXTStep environment generates output using the entire screen. It would be beneficial to be able to run the NeXTStep/OpenStep environments in another environment such as Solaris such that the NeXTStep/OpenStep environment runs within a window of the environment. Prior emulation schemes provide emulation by emulating system-level instruction sets. It would be beneficial to provide emulation capabilities at the Postscript level.
An environment is emulated in a host environment. Output generated in the emulated environment is displayed in a window of the host environment. The emulated environment""s output is in the form of Postscript commands that map to the entire screen. The host environment emulates the Postscript commands and maps the output to a window. Input associated with the window is retrieved by an event driver running in the host environment. Each instance of input is referred to as an event. Each event is translated into an event of the emulated environment by an event driver. A translated event is stored in shared memory for access by a window server. The event driver notifies the window server that one or more events are queued in shared memory. The window server processes the queued events by, for example, transmitting the event to an application running in the emulated environment.
When the emulated environment is invoked, its window server is invoked. The window server is modified to access the host environment and its display system. The window server invokes the event driver. The window server and event driver attach themselves to shared memory and the emulated environment""s window. Output to the window is preferably displayed in 24-bit color. However, gray scale output can be used if an 8-bit screen depth is present.
An event is translated by the event driver. The event driver can store a single translated event in shared memory and notify the window server. Alternatively, the event driver can process multiple events before notifying the window server. In addition, the event driver can combine events where possible. If an event is combined with a previous event, it is not written to shared memory.
As described above, the output of an emulated environment running in a host environment is processed by a window server running in the host environment. The window server processes the output such that the output is displayed in a window of a display of the host environment. Alternatively, the window server can be running on a system that executes the emulated environment as its native environment. The native environment includes a window server. Output generated by an application running in the emulated environment is transmitted to the native environment""s window server using a communication mechanism such as a port. The window server processes and displays the output in the native environment. Input associated with a window in the native environment is processed by the native environment""s window server and transmitted (via a port) to an application running in the emulated environment running in the host environment.